<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="./css/index.css">
    <link rel="stylesheet" type="text/css" href="./css/audio.css">
    <script src="https://cdn.bootcss.com/jquery/2.2.1/jquery.js"></script>
    <script src="./modules/header/slider.js"></script>
    <script type="text/javascript" src="audio.js"></script>
</head>
<body>
    <div id="header"></div>
    <script src="bundle.js"></script>
    <script>
        $(function(){ 
            var item = $("tr"); 
            for(var i=0;i<item.length;i++){ 
                if(i%2==0){ 
                    item[i].style.backgroundColor="#dddddd"; 
                } 
            } 
             var song = [
            {
                'cover' : './images/cover2.jpg',
                'src' : 'http://m2.music.126.net/4uhG3v3vvpRTwJ-HTd5P6w==/6637751697320553.mp3',
                'title' : 'Memories'
            },
            {
                'cover' : './images/cover.png',
                'src' : 'http://webmp3-1253691995.costj.myqcloud.com/audio/NumberOne.mp3',
                'title' : 'number one'
            },
            {
                'cover' : './images/cover1.jpg',
                'src' : 'http://webmp3-1253691995.costj.myqcloud.com/audio/dqwm.mp3',
                'title' : '大橋のぞみ - 黒ネコのタンゴ'
            },
            {
                'cover' : './images/cover3.jpg',
                'src' : 'http://webmp3-1253691995.costj.myqcloud.com/audio/qby.mp3',
                'title' : '黒うさP,初音ミク - 千本桜'
            },
            {
                'cover' : './images/cover4.jpg',
                'src' : 'http://webmp3-1253691995.costj.myqcloud.com/audio/jljt.mp3',
                'title' : '极乐净土'
            }
        ];

        var audioFn = audioPlay({
            song : song,
            autoPlay : true  //是否立即播放第一首，autoPlay为true且song为空，会alert文本提示并退出
        });

        /* 向歌单中添加新曲目，第二个参数true为新增后立即播放该曲目，false则不播放 */
        audioFn.newSong({
            'cover' : 'images/cover5.jpg',
            'src' : 'http://webmp3-1253691995.costj.myqcloud.com/audio/baab.mp3',
            'title' : 'B.A.A.B'
        },false);
  
        });

       

    </script>
    
</body>
</html>